package com.study.demo.service;

import com.study.demo.dao.UserDao;
import com.study.demo.domain.UserDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl {

    @Autowired
    private UserDao userDao;

    public UserDO getUserByName(String name) {
        return userDao.findByName(name);
    }

    public List<UserDO> getAllUsers() {
        return userDao.findAll();
    }
}
